<div id="content">
	<?php
    
if( !empty($post) ) {

	?>

	<article><header>
			<h1><?php echo $post -> getTitle(); ?></h1>		<h4> <i><abbr class="date time published" title="<?php echo $post -> getDatePublished()->format('l jS \of F Y h:i:s A')?>"><?php echo $post -> getDatePublished()->format('l jS \of F Y h:i:s A')?></abbr></i></h4>             </header>        <br />            <?php echo $post -> getArticle(); ?>                                        <?php  if($post -> getFile()!="")  {?>   
		<div class="additional_info">
			<?php
			$image_properties = array('src' => 'post_images/' . $post -> getFile(), 'alt' => $post -> getTitle(), 'width' => '650', 'title' => $post -> getTitle());
			echo img($image_properties);			?>
		</div>         <?php  } ?>                 <footer style="padding-top: 10px;">        	<h5>category <span> : </span> <strong> <em> <?php echo anchor('weblog/category/' . $post->getCategory()->getNameClean(), $post -> getCategory()->getNameClean() ); ?> </em> </strong> </h5>	        	<h5>wrote <span>by</span> <strong> <em> <?php echo $post -> getAuthor() -> getFullName(); ?> </em> </strong></h5>        	        </footer>
	</article>	<hr style="color:#FFFFFF; margin-top: 20px; margin-bottom: 20px;;background-color: #E7E7E7;height: 0px;opacity: .2" />
	<aside class="comments">
		<h2 class="outline_header">Related Comments</h2>
		<?php

if($post->getComments()  && count($post->getComments() )>0)
{
		?>
		<ol>
			<?php foreach ($post->getComments() as $comment) {
			?>
			<li style="list-style: none" id="comment<?php echo $comment -> getId(); ?>" >
				<h3><?php echo $comment -> getParticipant() -> getName(); ?> Says:</h3>
				<abbr class="date time published" title="<?php echo $comment -> getDateCreated() -> format('l jS \of F Y h:i:s A'); ?>"> <?php
				echo $comment -> getDateCreated() -> format('l jS \of F Y h:i:s A');					?></abbr>				<br>				<br>
				<p>
					<?php echo $comment -> getComment(); ?>
				</p>
			</li>
			<?php } ?>
		</ol>
		<?php
		}
		else{		?>
		<p  style="padding-left: 10px">
			there are no comments for the moment ....
		</p>
		<?php
		}		?>
 		<div class="form_settings"><hr style="color:#FFFFFF; margin-top: 20px; margin-bottom: 20px;;background-color: #E7E7E7;height: 0px;opacity: .2" /><br />
<h2 class="outline_header" >Please write your comment or suggestion : </h2><br />		<?php
		$hidden = array('post_id' => $post -> getId());		$attributes['id'] = "comment_form";				echo form_open("weblog/add_comment/", $attributes, $hidden);		?>
		<p>
			<label for="name">Name <em></em></label>
			
			<input id="name" name="name" class="contact" placeholder="your name..." type="text" required />
		</p>
		<p>
			<label for="email">Your email address </label>
		
			<input id="email" class="contact" name="email"  placeholder="your email address..." type="email" required>
		</p>
		<p>
			<label for="website">Website</label>
		
			<input id="website" class="contact" name="website"  placeholder="website..." type="url">
		</p>
		<p>
			<label for="comment" class="contact">Comment </label>
	
			<textarea id="comment" name="comment"  cols="35"  rows="10"  required></textarea>
		</p>		<p class="contact_buttons">
			<input type="reset" class="submit" value="Clear" />
			<input type="submit" class="submit" value="Send your comment" />
		</p>		
		<?php
		echo form_close();		?><script>	$(document).ready(function() {		$('#comment_form').validate({			rules : {				name : {					required : true,					minlength : 2				},				website : {					url : true				},				comment : {					required : true,					rangelength : [10, 1000]				},				email : {					required : true,					email : true				}			},			messages : {				name : {					required : "Please enter your name."				},				email : {					required : "Please enter your email address.",					email : "Please make sure that the email is valid."				},				website : {					url : "Please make sure that the URL of the website is valid."				},				comment : {					required : "Please enter your comment.",					rangelength : "Comment must be between 10 and 1000 characters long."				}			}		});	});		</script></div>
	</aside>		 
	<?php } else{ ?>

	<blockquote class="sorry">
		<h3>I'm so sorry</h3>
		<p>
			So far I have not written anything...
		</p>
	</blockquote>
	<?php } ?>
</div>